﻿using System;
using System.Collections.Generic;
using System.Text;
using JWUX.Supermarket.Model;

namespace JWUX.Supermarket.IDAL
{
    public interface IRequest
    {
        /// <summary>
        /// 添加一个需求
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        decimal Insert(RequestInfo model);

        /// <summary>
        /// 删除（禁用）一个需求
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool Delete(RequestInfo model);

        /// <summary>
        /// 更新一个需求
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool Update(RequestInfo model);

        /// <summary>
        /// 获取一个物料需求实例
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        RequestInfo Get(decimal id);

        /// <summary>
        /// 获取可用的物料需求列表
        /// </summary>
        /// <returns></returns>
        List<RequestInfo> Get();
    }
}
